package com.waimai.mobile.ui.activity;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Background;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.UiThread;
import org.androidannotations.annotations.ViewById;
import org.androidannotations.annotations.WindowFeature;

import com.waimai.mobile.R;

import android.app.Activity;
import android.content.Intent;
import android.view.Window;
import android.widget.ImageView;

@EActivity(R.layout.activity_splash)
@WindowFeature(Window.FEATURE_NO_TITLE)
public class SplashActivity extends Activity{



	@ViewById(R.id.splashImg)
	public ImageView splashImg;


	@AfterViews
	public void doSpalsh(){
		splashThread();
	}

	@Background
	public void splashThread(){
		try {
			Thread.sleep(2000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		toMainActivity();
	}




	@UiThread
	public void toMainActivity() {
		Intent intent = new Intent(getApplicationContext(),MainActivity_.class);
		startActivity(intent);
		finish();
	}
}
